package com.comtime.greendaodemo;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;
import java.util.logging.MemoryHandler;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.comtime.greendaodemo.NewInfo;
import com.comtime.greendaodemo.DeviceInfo;
import com.comtime.greendaodemo.RemindInfo;
import com.comtime.greendaodemo.OpenLockInfo;
import com.comtime.greendaodemo.AuthInfo;
import com.comtime.greendaodemo.FingerprintInfo;

import com.comtime.greendaodemo.NewInfoDao;
import com.comtime.greendaodemo.DeviceInfoDao;
import com.comtime.greendaodemo.RemindInfoDao;
import com.comtime.greendaodemo.OpenLockInfoDao;
import com.comtime.greendaodemo.AuthInfoDao;
import com.comtime.greendaodemo.FingerprintInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig newInfoDaoConfig;
    private final DaoConfig deviceInfoDaoConfig;
    private final DaoConfig remindInfoDaoConfig;
    private final DaoConfig openLockInfoDaoConfig;
    private final DaoConfig adminDaoConfig;
    private final DaoConfig memberInfoDaoConfig;
	private final DaoConfig authInfoDaoConfig;
    private final DaoConfig fingerprintInfoDaoConfig;

    private final NewInfoDao newInfoDao;
    private final DeviceInfoDao deviceInfoDao;
    private final RemindInfoDao remindInfoDao;
    private final OpenLockInfoDao openLockInfoDao;
    private final AdminDao adminDao;
    private final MemberInfoDao memberInfoDao;
	private final AuthInfoDao authInfoDao;
    private final FingerprintInfoDao fingerprintInfoDao;


    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);
        memberInfoDaoConfig = daoConfigMap.get(MemberInfoDao.class).clone();
        memberInfoDaoConfig.initIdentityScope(type);

        adminDaoConfig = daoConfigMap.get(AdminDao.class).clone();
        adminDaoConfig.initIdentityScope(type);

        newInfoDaoConfig = daoConfigMap.get(NewInfoDao.class).clone();
        newInfoDaoConfig.initIdentityScope(type);

        deviceInfoDaoConfig = daoConfigMap.get(DeviceInfoDao.class).clone();
        deviceInfoDaoConfig.initIdentityScope(type);

        remindInfoDaoConfig = daoConfigMap.get(RemindInfoDao.class).clone();
        remindInfoDaoConfig.initIdentityScope(type);

        openLockInfoDaoConfig = daoConfigMap.get(OpenLockInfoDao.class).clone();
        openLockInfoDaoConfig.initIdentityScope(type);
		
		authInfoDaoConfig = daoConfigMap.get(AuthInfoDao.class).clone();
        authInfoDaoConfig.initIdentityScope(type);

        fingerprintInfoDaoConfig = daoConfigMap.get(FingerprintInfoDao.class).clone();
        fingerprintInfoDaoConfig.initIdentityScope(type);

        memberInfoDao=new MemberInfoDao(memberInfoDaoConfig,this);
        adminDao=new AdminDao(adminDaoConfig,this);
        newInfoDao = new NewInfoDao(newInfoDaoConfig, this);
        deviceInfoDao = new DeviceInfoDao(deviceInfoDaoConfig, this);
        remindInfoDao = new RemindInfoDao(remindInfoDaoConfig, this);
        openLockInfoDao = new OpenLockInfoDao(openLockInfoDaoConfig, this);
        authInfoDao = new AuthInfoDao(authInfoDaoConfig, this);
        fingerprintInfoDao = new FingerprintInfoDao(fingerprintInfoDaoConfig, this);

        registerDao(NewInfo.class, newInfoDao);
        registerDao(DeviceInfo.class, deviceInfoDao);
        registerDao(RemindInfo.class, remindInfoDao);
        registerDao(OpenLockInfo.class, openLockInfoDao);
        registerDao(AdminInfo.class,adminDao);
        registerDao(MemberInfo.class,memberInfoDao);
		registerDao(AuthInfo.class, authInfoDao);
        registerDao(FingerprintInfo.class, fingerprintInfoDao);


    }
    
    public void clear() {
        newInfoDaoConfig.getIdentityScope().clear();
        deviceInfoDaoConfig.getIdentityScope().clear();
        remindInfoDaoConfig.getIdentityScope().clear();
        openLockInfoDaoConfig.getIdentityScope().clear();
        adminDaoConfig.getIdentityScope().clear();
        memberInfoDaoConfig.getIdentityScope().clear();
		authInfoDaoConfig.getIdentityScope().clear();
        fingerprintInfoDaoConfig.getIdentityScope().clear();
    }

    public NewInfoDao getNewInfoDao() {
        return newInfoDao;
    }

    public DeviceInfoDao getDeviceInfoDao() {
        return deviceInfoDao;
    }

    public RemindInfoDao getRemindInfoDao() {
        return remindInfoDao;
    }

    public OpenLockInfoDao getOpenLockInfoDao() {
        return openLockInfoDao;
    }
	
	public AuthInfoDao getAuthInfoDao() {
        return authInfoDao;
    }

    public FingerprintInfoDao getFingerprintInfoDao() {
        return fingerprintInfoDao;
    }
	
    public AdminDao getAnmindao() {
        return adminDao;
    }

    public MemberInfoDao getMemberInfoDao(){
        return memberInfoDao;
    }

}
